package cn.study.luckyapp.record.command;

import cn.study.luckyclient.dto.RecordUpdateStatusCmd;
import cn.study.luckydomain.gateway.RecordGateWay;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Component
@Service
@AllArgsConstructor
public class RecordUpdateStatusCmdExe {
    private final RecordGateWay recordGateway;

    public Boolean execute(RecordUpdateStatusCmd cmd) {
        Boolean updateStatus = recordGateway.updateStatus(cmd.getId(), cmd.getState());
        return updateStatus;
    }
}
